<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../jquery-easyui-1.5.2/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../jquery-easyui-1.5.2/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="../../jquery-easyui-1.5.2/demo.css">
		<link rel="stylesheet" type="text/css" href="../../style/syExtIcon.css">

		<script type="text/javascript" src="../../jquery-easyui-1.5.2/jquery.min.js"></script>
		<script type="text/javascript" src="../../jquery-easyui-1.5.2/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../../js/syExtEasyUI.js"></script>
		<script type="text/javascript" src="../../js/syExtHighcharts.js"></script>
		<script type="text/javascript" src="../../js/syExtJavascript.js"></script>
		<script type="text/javascript" src="../../js/syExtJquery.js"></script>
		<script type="text/javascript">
			var submitNow = function($parentId, $dialog, $tree, $pjq) {
				if(!$('#form').form("validate")){
					return;
				}
				var url = '/carpark/addFixCharge';
				var data = sy.serializeObject($('#form'));
				if(data.id == null) {
					data.carparkId = $parentId;
				}
				$.post(url, data, function(result) {
					if(result.success) {
						$pjq.messager.alert('提示', result.msg, 'info');
						parent.loadDataGrid();
						$dialog.dialog('destroy');
					} else {
						$pjq.messager.alert('提示', result.msg, 'error');
					}
				}, 'json');
			}
			var loadForm = function(data) {
				if(data == null) {
					return;
				}
				$('form').form('load', {
					'id': data.id,
					'carparkId': data.carparkId,
					'chargeCode': data.chargeCode,
					'chargeName': data.chargeName,
					'carType': data.carType,
					'rentingDays': data.rentingDays,
					'expiringDays': data.expiringDays,
					'delayDays': data.delayDays,
					'price': data.price,
					'parkType': data.parkType,
					'note': data.note,
				});
			}
			$(function() {
				if(parent.fixChargeData == null) {
					return;
				}
				loadForm(parent.fixChargeData);
			});
		</script>
	</head>

	<body>
		<form id="form" method="post">
				<table class="table" style="width: 100%;">
					<tr style="display: none;">
						<th>id</th>
						<td><input name="id" value="" /></td>
					</tr>
					<tr style="display: none;">
						<th>parentId</th>
						<td><input name="carparkId" value="" /></td>
					</tr>
					<tr>
						<th>月租类型编码</th>
						<td><input name="chargeCode" value="" class="easyui-textbox" data-options="required:true" /></td>
					</tr>
					<tr>
						<th>月租类型名称</th>
						<td><input name="chargeName" value="" class="easyui-textbox" data-options="required:true" /></td>
					</tr>
					<tr>
						<th>车&ensp;&ensp;辆&nbsp;&nbsp;类&nbsp;&nbsp;型</th>
						<td><select class="easyui-combobox" name="carType">
								<option value="小车">小车</option>
								<option value="大车">大车</option>
								<option value="摩托车">摩托车</option>
							</select></td>
					</tr>
					<tr>
						<th>月&ensp;&ensp;租&nbsp;&nbsp;月&nbsp;&nbsp;数</th>
						<td><input name="rentingDays" class="easyui-numberbox" value="1" data-options="precision:0" /></td>
					</tr>
					<tr>
						<th>到期提醒天数</th>
						<td><input name="expiringDays" class="easyui-numberbox" value="5" data-options="precision:0" /></td>
					</tr>
					<tr>
						<th>到期延迟天数</th>
						<td><input name="delayDays" class="easyui-numberbox" value="0" data-options="precision:0" /></td>
					</tr>
					<tr>
						<th>租&ensp;&ensp;赁&nbsp;&nbsp;金&nbsp;&nbsp;额</th>
						<td><input name="price" class="easyui-numberbox" value="0" data-options="precision:0" /></td>
					</tr>
					<tr>
						<th>车&ensp;&ensp;位&nbsp;&nbsp;类&nbsp;&nbsp;型</th>
						<td>
							<select class="easyui-combobox" name="parkType" value="非固定车位">
								<option value="固定车位">固定车位</option>
								<option value="非固定车位">非固定车位</option>
							</select>
						</td>
					</tr>
					<tr>
						<th>备&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;注</th>
						<td><input name="note" class="easyui-numberbox" value="" /></td>
					</tr>
				</table>
		</form>
	</body>

</html>